package com.ruoyi.system.service;

import java.util.List;
import com.ruoyi.system.domain.Purchase;

/**
 * 采购单Service接口
 * 
 * @author ruoyi
 * @date 2021-05-06
 */
public interface IPurchaseService 
{
    /**
     * 查询采购单
     * 
     * @param id 采购单ID
     * @return 采购单
     */
    public Purchase selectPurchaseById(Long id);

    /**
     * 查询采购单列表
     * 
     * @param purchase 采购单
     * @return 采购单集合
     */
    public List<Purchase> selectPurchaseList(Purchase purchase);

    /**
     * 新增采购单
     * 
     * @param purchase 采购单
     * @return 结果
     */
    public int insertPurchase(Purchase purchase);

    /**
     * 修改采购单
     * 
     * @param purchase 采购单
     * @return 结果
     */
    public int updatePurchase(Purchase purchase);

    /**
     * 批量删除采购单
     * 
     * @param ids 需要删除的采购单ID
     * @return 结果
     */
    public int deletePurchaseByIds(Long[] ids);

    /**
     * 删除采购单信息
     * 
     * @param id 采购单ID
     * @return 结果
     */
    public int deletePurchaseById(Long id);


    //新增采购单
    int insertPurchaseRecord(Purchase purchase);

    //获取运费
    Double getShipping(long pro_id);

    //删除具体材料
    int deleteMat(long id);

    //生成出入库单
    int addInMonad(Long pur_id);

    //生车出库单
    int addOutMonad(Long pur_id);

    public Purchase selectPurchaseSum(Long id);

    int stateOfPurchase(Long pur_id);

}
